// 长亮路由

export const broadcast = [
  // 路由表配置
  // 登陆路由
  {
    path: "/login",
    component: () => import("@/views/login/index.vue"),
    name: "login", //权限会用到这个 菜单权限
    meta: {
      title: "登录", //菜单标题
      hidden: true, //隐藏当前菜单 true隐藏 false不隐藏
      icon: "Promotion",
    },
  },
  // 登陆成功展示的页面数据首页路由
  // 这里如果就显示一个菜单就没必要折叠了
  {
    path: "/",
    component: () => import("@/layout/index.vue"),
    name: "layout", //权限会用到这个 菜单权限
    meta: {
      title: "",
      hidden: false, //隐藏当前菜单
      icon: "",
    },
    redirect: "/home",
    children: [
      {
        path: "/home",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "首页",
          hidden: false, //隐藏当前菜单
          icon: "House",
        },
      },
      // {
      //   path: '/test',
      //   component: () => import('@/views/home/index.vue'),
      //   meta: {
      //     title: "测试",
      //     hidden: false,//隐藏当前菜单
      //     icon: "Odometer"
      //   },
      // }
    ],
  },
  // 404路由
  {
    path: "/404",
    component: () => import("@/views/404/index.vue"),
    name: "404", //权限会用到这个 菜单权限
    meta: {
      title: "404",
      hidden: true, //隐藏当前菜单
      icon: "Odometer",
    },
  },
  // 大屏数据
  {
    path: "/screem",
    component: () => import("@/views/screem/index.vue"),
    meta: {
      title: "数据大屏",
      hidden: false, //隐藏当前菜单
      icon: "Monitor",
    },
  },
  // 权限路由
  {
    path: "/authority",
    component: () => import("@/layout/index.vue"),
    name: "Acl",
    meta: {
      title: "权限管理",
      hidden: false, //隐藏当前菜单
      icon: "Lock",
    },
    redirect: "/authority/user",
    children: [
      {
        path: "/authority/user",
        component: () => import("@/views/authority/user/inex.vue"),
        name: "User",
        meta: {
          title: "用户管理",
          hidden: false, //隐藏当前菜单
          icon: "User",
        },
      },
      {
        path: "/authority/menu",
        component: () => import("@/views/authority/menu/index.vue"),
        name: "Permission",
        meta: {
          title: "菜单权限管理",
          hidden: false, //隐藏当前菜单
          icon: "Calendar",
        },
      },
      {
        path: "/authority/role",
        component: () => import("@/views/authority/role/inex.vue"),
        name: "Role",
        meta: {
          title: "角色管理",
          hidden: false, //隐藏当前菜单
          icon: "GoldMedal",
        },
      },
    ],
  },
  // 商品管理
  {
    path: "/management",
    component: () => import("@/layout/index.vue"),
    name: "Product",
    meta: {
      title: "商品管理",
      hidden: false, //隐藏当前菜单
      icon: "Goods",
    },
    redirect: "/management/branding", //点击访问/management这个路由直接重订项/management/branding
    children: [
      {
        path: "/management/branding",
        component: () => import("@/views/management/branding/index.vue"),
        name: "Trademark",
        meta: {
          title: "品牌管理",
          hidden: false, //隐藏当前菜单
          icon: "ShoppingCartFull",
        },
      },
      {
        path: "/management/spu",
        component: () => import("@/views/management/spu/index.vue"),
        name: "Spu",
        meta: {
          title: "SPU管理",
          hidden: false, //隐藏当前菜单
          icon: "Calendar",
        },
      },
      {
        path: "/management/sku",
        component: () => import("@/views/management/sku/index.vue"),
        name: "Sku",
        meta: {
          title: "SKU管理",
          hidden: false, //隐藏当前菜单
          icon: "Orange",
        },
      },
      {
        path: "/management/attribute",
        component: () => import("@/views/management/attribute/index.vue"),
        name: "Attr",
        meta: {
          title: "属性管理",
          hidden: false, //隐藏当前菜单
          icon: "ChromeFilled",
        },
      },
    ],
  },
  // 任意路由 就上所有路由都不是就匹配下面这个
  {
    path: "/:pathMatch(.*)*", //上面都匹配不到就会执行这段代码
    redirect: "/404",
    name: "any", //权限会用到这个 菜单权限
    meta: {
      title: "任意路由",
      hidden: true, //隐藏当前菜单
      icon: "Odometer",
    },
  },
]
